﻿using System.Linq.Expressions;

namespace Lucene.Linq.Expressions
{
    internal class ProjectionExpression : Expression
    {
        private readonly Expression _projector;
        private readonly SelectExpression _source;

        internal ProjectionExpression(SelectExpression source, Expression projector)
            : base((ExpressionType) LuceneExpressionType.Projection, source.Type)
        {
            _source = source;
            _projector = projector;
        }

        internal SelectExpression Source
        {
            get { return _source; }
        }

        internal Expression Projector
        {
            get { return _projector; }
        }
    }
}